package com.atguigu.gmall.list.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.list.SearchParam;
import com.atguigu.gmall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-list")
public interface ListFeignClient {
/**  *********************前端页面不可操作，无需经过网关****************************
    //创建索引
    @GetMapping("/api/list/creatIndex")
    public Result createIndex();

    //导入索引：sku上架时保存到ES中时的内容
    @GetMapping("/api/list/upperGoods/{skuId}")
    public Result upperGoods(@PathVariable Long skuId);

    //删除索引
    @GetMapping("/api/list/lowerGoods/{skuId}")
    public Result lowerGoods(@PathVariable Long skuId);
*/

    //增加热度
    @GetMapping("/api/list/hotScore/{skuId}")
    public Result hotScore(@PathVariable Long skuId);

    //开始搜索ES索引库
    @PostMapping("/api/list/search")
    public SearchResponseVo search(@RequestBody SearchParam searchParam);
    }


